
#ifndef _Encoder_H_
#define _Encoder_H_


#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "freertos/event_groups.h"
#include "driver/gpio.h"
#include "esp_err.h"
#include "sdkconfig.h"


#define     Encoder_A     17    //编码器通道一
#define     Encoder_B     15    //编码器通道二
#define     Encoder_K     16    //编码器按键通道

#define     Encoder_CHA_GPIO_INPUT_PIN_SEL      ((1ULL<<Encoder_A))
#define     Encoder_CHB_GPIO_INPUT_PIN_SEL      ((1ULL<<Encoder_B))
#define     Encoder_KEY_GPIO_INPUT_PIN_SEL      ((1ULL<<Encoder_K))

extern QueueHandle_t encoder_gpio_event_queue;
void Encoder_init(void);
char Encoder_Get_State( void );
void Encoder_Test(void *pvParameter );
#endif


